Component({
  properties: {
    headers: {
      type: Array,
      value: [],
    },
    data: {
      type: Array,
      value: [],
    },
    showDelete: {
      type: Boolean,
      value: false,
    },
  },
  data: {},
  methods: {
    onRowTap(e) {
      const { index } = e.currentTarget.dataset;
      this.triggerEvent("rowtap", {
        index,
      });
    },
    onDelete(e) {
      const { index } = e.currentTarget.dataset;
      console.log("onDelete", index);
      this.triggerEvent("delete", {
        index,
      });
    },
  },
});
